import request from './request';

// 获取展览列表
export function getExhibitionList(params) {
  return request({
    url: '/exhibition/list',
    method: 'get',
    params
  });
}

// 获取展览详情
export function getExhibitionDetail(id) {
  return request({
    url: `/exhibition/detail/${id}`,
    method: 'get'
  });
}

// 创建展览
export function createExhibition(data) {
  return request({
    url: '/exhibition/add',
    method: 'post',
    data
  });
}

// 别名，为了兼容性
export const addExhibition = createExhibition;

// 更新展览
export function updateExhibition(data) {
  return request({
    url: '/exhibition/update',
    method: 'put',
    data
  });
}

// 更新展览状态
export function updateExhibitionStatus(id, status) {
  return request({
    url: `/exhibition/status/${id}`,
    method: 'put',
    params: { status }
  });
}

// 删除展览
export function deleteExhibition(id) {
  return request({
    url: `/exhibition/delete/${id}`,
    method: 'delete'
  });
}

// 获取展览图片列表
export function getExhibitionImages(id) {
  return request({
    url: `/exhibition/images/${id}`,
    method: 'get'
  });
} 